# Environments

An environment provides access to your data model. Cube Cloud provides the following environments:
- production (default)
- staging - providing access to the data model on a specific branch.
  Each branch in the repository corresponds to a separate staging environment.
  Changes must be committed to a branch to be viewable in this environment.
- development - providing access to the data model that you are currently working on.
  The development environment is automatically created when you enter [development mode][ref-dev-mode].
  One development environment is allocated per user.
  It tracks the branch you're currently on and is updated automatically when you save changes to the data model.
  You cannot query the development enviornment unless your user is in dev mode on the branch you are trying to access.

## Staging Environments
Staging environments are typically only available when the linked branch is active.
An active branch is the one that is selected on the Data Model screen by at least one user.
To keep a staging environment always active, toggle the switch for the corresponding branch in Settings > Staging Environments.
<Screenshot
  src="https://ucarecdn.com/b0e81a61-5887-424b-af89-d5e9cebb24f2/"
  alt="Staging Environments settings"
/>

## API Endpoints
Each environment provides its own set of API and SQL API endpoints.
You can reference them on the [Data Model][ref-data-model]'s Overview page and <Btn>BI Integrations</Btn> SQL API Connection tab.
To query a development environment's API endpoints, your user must be in dev mode and on the branch that has the saved changes.

<Screenshot
  src="https://ucarecdn.com/e1cddf72-3044-4d72-a0b9-023bf3285786/"
  alt="Data Model's Overview page"
/>
<Screenshot
  src="https://ucarecdn.com/64e244dc-3632-4403-bea5-38b9632094cc/"
  alt="BI Integrations SQL API Connection tab"
/>

[ref-dev-mode]: /product/workspace/dev-mode
[ref-data-model]: /product/workspace/data-model
